Homework #6: #1: (this one is quite hard; start it early!) Fli-Bi-Nite airlines has a flight that starts in LA, flies to Houston, then NYC, then Miami. The length of each segment (in miles) is 1500, 1700, and 1300 respectively. At each stop, the plane may purchase up to 10,000 gallons of fuel. The prices in each city (in cents/gal) are: 88, 15, 105, and 95. The plane's tank can hold at most 12,000 gallons. To allow for the possibility of circling while waiting to land, we require that the ending fuel level for each leg of the flight be 600 gallons. We'll suppose that the airplane gets 0.3 miles per gallon. The plane starts in LA with 4933.3333 gallons before buying fuel and taking off. Formulate and solve an LP that can be used to minimize the fuel cost incurred in completing the schedule. Notes: * I STRONGLY RECOMMEND that you formulate it with pencil and paper first, then turn it into a matrix form before typing it in to Excel. * It's possible to do it with only 4 decision variables, but it goes a lot easier if you use a bunch of bookkeeping variables as well. --------------------------------------------------------- #2: Curve fitting Consider this data on the growth of a batch of yeast: Time(hours) Biomass 0 9.6 1 18.3 2 29.0 3 47.2 4 71.1 5 119.1 6 174.6 7 247.3 a) Using excel's usual trendline feature, fit an Exponential model to it. b) Compute the residuals using that exponential model, and the sum of squared residuals. c) Write down (using math notation) a nonlinear program that will choose the coefficients in the epxonential model to minimize the sum of squared residuals. c) Set up a nonlinear program to choose the coefficients in the exponential model, and optimize it using Solver. Report your optimal coefficients and the sum of squared residuals. d) Compare the two results (those of parts a&b versus part c). Use graphs and sentences as appropriate. If there is a difference, explain why. --------------------------------------------------------- #3: The ShotSpotter problem. Shotspotter has set up open-air microphones around a city like Oakland, CA. Each microphone records the time that a gunshot sound arrived at the microphone and reports it to a central computer, which then figures out where the gunshot must have been. Suppose you get data from sensors as follows: the (x,y) for each sensor and the time of arrival of the gunshot sound were: x y arr.time 0 0 10.260536 0 0.5 10.259994 0 1 10.259598 0.5 0 10.260313 0.5 0.5 10.259691 x and y are measured in miles, and arr.time in clock time hours (i.e. it was around 10:15 pm, since 10.25 is 10 hrs and one quarter-hour). The speed of sound in the air that night was 770 mph. a) Formulate an NLP that will tell you where the shot was fired. This is not straightforward! It takes some creativity. b) Solve it in Excel or whatever. c) Does it make a difference if you assume a different speed of sound? Try something ridiculous like 100 mph and see if the estimated location changes. d) Project idea (optional, of course): reformulate to include wind. e) Project idea (optional, of course): suppose each sensor is actually a cluster of 4 microphones; these can then determine the direction the sound came from. So if you have 2 or 3 of these that hear the shot, you can use the direction from each to triangulate. f) Project idea (optional, of course): try to draw contours of uncertainty. That is, report not just the optimal estimated position, but some measure of how certain you are. This might involve perturbing the arrival time data a little bit, re-solving, and repeating this 1000 times to see how much the optimal location changes.